import java.util.*;
import java.io.*;


// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class test_2 {
    public static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static Read in = new Read();

    public static void main(String[] args) throws IOException {
        int n = in.nextInt();
        int x = in.nextInt();

        int[] nums = new int[n];
        int sum = 0;
        int l = 0;
        int len = n;

        for (int i = 0, left = 0; i < n; i++) {
            nums[i] = in.nextInt();
            sum += nums[i];
            while (sum >= x) {
                if ((i - left+1) < len) {
                    len = i - left+1;
                    l = left;
                }
                sum -= nums[left];
                left++;
            }
        }
        int r = l + len;
        System.out.println(l + " " + r);
    }
}

class Read1 // 自定义快速读入
{
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException
    {
        while(!st.hasMoreTokens())
        {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }

    String nextLine() throws IOException
    {
        return bf.readLine();
    }

    int nextInt() throws IOException
    {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException
    {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException
    {
        return Double.parseDouble(next());
    }
}